<script>
  import $ from 'dfish-widget'
  import Widget from '../Widget.vue'

  export default {
    mixins: [Widget],
    data() {
      return {
        name: 'Pop',
        remark: '为页面元素设置弹窗',
        hasCommon: false,
        attrs: [{
          name: 'hover-show-drop',
          type: 'Boolean',
          remark: '是否在鼠标hover时展示弹窗',
        } ],
        slots: [{
          name: 'default',
          remark: '绑定的目标元素',
          option: ''
        }, {
          name: 'pop',
          remark: '弹窗组件',
          option: ''
        }],
        examples: [{
          remark: '鼠标点击"更多"，显示下拉菜单',
          type: 'html',
					view: true,
          code: `
            <template>
              <w-pop>
                <span>更多</span>
                <template #pop>
                  <w-menu>
                    <w-button text="预览"></w-button>
                    <w-button text="删除"></w-button>
                  </w-menu>
                </template>
              </w-pop>
            </template>
          `,
        }, {
          remark: '鼠标移到按钮上，显示tip',
          type: 'html',
					view: true,
          code: `
            <template>
              <w-pop :hover-show-drop="true">
                <w-button text="更多"></w-button>
                <template #pop>
                  <w-tip text="更多"></w-tip>
                </template>
              </w-pop>
            </template>
          `,
        }]
      }
    }
  }
</script>
